package com.huaxindata.im.model.contact;


import com.huaxindata.im.model.entity.ChatMessage;

/**
 * Created by hebing on 2016/12/6.
 */

public class GroupModel {
    //{"groupClientId":"5236_17","groupIcon":"","groupMain":345,"groupMembers":"345,334,339,316","groupName":"人多的"}
    public String groupClientId;//
    public String groupMain;//群主
    public String groupName;//昵称
    public String groupMembers;//群成员
    public String groupIcon;

    private String[] tmpMembers;

    public String[] getGroupMembers() {
        if (tmpMembers == null) {
            tmpMembers = groupMembers.split(",");
        }
        return tmpMembers;
    }

    @Override
    public String toString() {
        return groupClientId + ChatMessage.PREX
                + groupName + ChatMessage.PREX
                + groupMain + ChatMessage.PREX
                + groupMembers + ChatMessage.PREX
                + (groupIcon == null ? "" : groupIcon);
    }
}
